package com.demo.dune.service.strategy;

import lombok.Getter;

/**
 * Book system MemberType.
 * @author Allen
 * @version 1.0 2022-04-03
 */
@Getter
public enum MemberTypeEnum {
	
	GOLD("001", "Gold"), 
	
	SILVER("002", "Silver"), 
	
	COPER("003", "Coper");

	private String code;

	private String msg;
	
	private MemberTypeEnum(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}	
	
	/**
	 * isInclude.
	 * @param code
	 * @return boolean
	 */
    public static boolean isInclude(String code){
        boolean isInclude = false;
        for (MemberTypeEnum entity: MemberTypeEnum.values()){
            if(entity.getCode().equals(code)){
            	isInclude = true;
                break;
            }
        }
        return isInclude;
    }

}
